package com.gzsxy.esjy.service.base.dto.response;

import java.util.*;

/**
 * @author xiaolong
 * @version 1.0
 * @description: 基础分页查询
 * @date 2021/12/31 17:05
 */
public class PageResult<T>{

    private List<T> records = new ArrayList<T>();


    protected int page;

    protected int size;

    protected Long total;

    public List<T> getRecords() {
        return this.records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    public int getPage() {
        return this.page;
    }

    public PageResult<T> setPage(int page) {
        this.page = page;
        return this;
    }

    public int getSize() {
        return this.size;
    }

    public PageResult<T> setSize(int size) {
        this.size = size;
        return this;
    }

    public Long getTotal() {
        return total;
    }

    public PageResult<T> setTotal(Long total) {
        this.total = total;
        return this;
    }

    @Override
    public String toString() {
        return "PageResult{" +
                "records=" + records +
                ", page=" + page +
                ", size=" + size +
                ", total=" + total +
                '}';
    }


}
